import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity()
export class Product {
    @PrimaryGeneratedColumn("uuid")
    id: string;

    @Column({ nullable: false })
    name: string;

    @Column({ nullable: false })
    img_url: string;

    @Column({ nullable: false })
    price: number;

    @Column("simple-array", { nullable: true, comment: "主类型"})
    type: string[];

    @Column("simple-array", { nullable: true, comment: "次类型" })
    type_es: string[];

    @Column("simple-array", { nullable: false, comment: "大轮播图" })
    imgBigUrls: string[];

    @Column("simple-array", { nullable: false, comment: "小轮播图" })
    imgSmallUrls: string[];

    @Column({ nullable: false})
    introduce: string;

    @Column({ nullable: true})
    info: string;

    @Column("simple-array", { nullable: true})
    color: string[];

    @CreateDateColumn({ nullable: false})
    time: Date;

    

}